Page({
  data: {

  },
  onLoad: function(options) {
    var title = options.title;
    var content = options.content;
    var tel = options.tel;
    wx.showModal({
      title: title,
      content: content,
      confirmText: '立即拨打',
      success: function(res) {
        if (res.confirm) {
          wx.makePhoneCall({
            phoneNumber: tel,
            success: function() {
              console.log("拨打电话成功！")
            },
            fail: function() {
              console.log("拨打电话失败！")
            }
          })
        } else if (res.cancel) {
          console.log('用户点击取消')
        }
      }
    })
  }

})